package com.atguigu.webflux.schema;

import jakarta.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Optional;

import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;

public class FlightStep1Form {
  @JsonProperty("findFlights.x")
  private int findFlightsX;

  @JsonProperty("findFlights.y")
  private int findFlightsY;

  @NotBlank(message = "depart cannot be empty")
  private String depart;

  @NotBlank(message = "arrive cannot be empty")
  private String arrive;

  @NotBlank(message = "departDate cannot be empty")
  private String departDate;

  @NotBlank(message = "returnDate cannot be empty")
  private String returnDate;

  private String seatPref;

  private String seatType;

  private int advanceDiscount;

  private int numPassengers;

  private Long userId;

  @JsonProperty(".cgifields")
  private List<String> cgifields;

  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }
  public Optional<List<String>> getCgifields() {
    return Optional.ofNullable(cgifields);
  }

  public void setCgifields(List<String> cgifields) {
    this.cgifields = cgifields;
  }

  public int getFindFlightsX() {
    return findFlightsX;
  }

  public void setFindFlightsX(int findFlightsX) {
    this.findFlightsX = findFlightsX;
  }

  public int getFindFlightsY() {
    return findFlightsY;
  }

  public void setFindFlightsY(int findFlightsY) {
    this.findFlightsY = findFlightsY;
  }

  public String getDepartDate() {
    return departDate;
  }

  public void setDepartDate(String departDate) {
    this.departDate = departDate;
  }

  public String getReturnDate() {
    return returnDate;
  }

  public void setReturnDate(String returnDate) {
    this.returnDate = returnDate;
  }

  public String getSeatPref() {
    return seatPref;
  }

  public void setSeatPref(String seatPref) {
    this.seatPref = seatPref;
  }

  public String getSeatType() {
    return seatType;
  }

  public void setSeatType(String seatType) {
    this.seatType = seatType;
  }

  public String getDepart() {
    return depart;
  }

  public void setDepart(String depart) {
    this.depart = depart;
  }

  public String getArrive() {
    return arrive;
  }

  public void setArrive(String arrive) {
    this.arrive = arrive;
  }

  public int getAdvanceDiscount() {
    return advanceDiscount;
  }

  public void setAdvanceDiscount(int advanceDiscount) {
    this.advanceDiscount = advanceDiscount;
  }

  public int getNumPassengers() {
    return numPassengers;
  }

  public void setNumPassengers(int numPassengers) {
    this.numPassengers = numPassengers;
  }
}
